package com.jt.www.admin.stats.controller;

import com.jt.www.admin.stats.service.InternShipService;
import com.jt.www.model.reps.ResultDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author admin_ltf
 * @create 2019-05-16 16:24
 */
@Api(value = "实责", tags = {"InternShip-API"}, description = "实责")
@RestController
@RequestMapping(value = "/stats/sz")
public class InternshipController {

    public static final Logger log = LoggerFactory.getLogger(InternshipController.class);


    @Autowired
    InternShipService internShipService;

    /**
     * 实习安全事故场所分布
     *
     * @return
     */
    @ApiOperation(value = "实习安全事故场所分布", notes = "实习安全事故场所分布", httpMethod = "POST")
    @PostMapping(value = "/getAccidentPlace")
    public ResultDTO<Map<String, Object>> searchAccidentPlaceInfo() {

        ResultDTO resultMap = internShipService.searchAccidentPlaceInfo();

        return resultMap;
    }


    /**
     * 实习伤亡事故类型分布
     *
     * @return
     */
    @ApiOperation(value = "实习伤亡事故类型分布", notes = "实习伤亡事故类型分布", httpMethod = "POST")
    @PostMapping(value = "/getAccidentType")
    public ResultDTO<Map<String, Object>> searchAccidentTypeInfo() {

        ResultDTO resultMap = internShipService.searchAccidentTypeInfo();

        return resultMap;
    }


    /**
     * 学生死亡事故类型分布
     *
     * @return
     */
    @ApiOperation(value = "学生死亡事故类型分布", notes = "学生死亡事故类型分布", httpMethod = "POST")
    @PostMapping(value = "/getStuAccidentType")
    public ResultDTO<Map<String, Object>> searchStuAccidentTypeInfo() {

        ResultDTO resultMap = internShipService.searchStuAccidentTypeInfo();

        return resultMap;
    }

}
